package com.example.androidnote.Util;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class NoteDB extends SQLiteOpenHelper {
    public static final String TABLE = "notes";
    public static final String CONTENT = "content";
    public static final String IMG_PATH = "img_path";
    public static final String VED_PATH = "ved_path";
    public static final String ID = "ssid";
    public static String TIME = "time";

    public NoteDB(@Nullable Context context) {
        super(context, "noteDB", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("CREATE TABLE "+TABLE+"("+ID+" INTEGER PRIMARY KEY AUTOINCREMENT," + CONTENT+" TEXT NOT NULL,"+ IMG_PATH+" TEXT,"+ VED_PATH+" TEXT,"+TIME+" TEXT NOT NULL)");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
